Package com.rnett.action.core

Wrappers for @actions/core.

Types

AnnotationProperties
Link copied to clipboard
data class AnnotationProperties
Properties for GitHub actions state annotations.
core
Link copied to clipboard
object core
Wrappers for @actions/core.
env
Link copied to clipboard
object env : Environment
Environment accessors, where set variables are not exported (i.e.
Environment
Link copied to clipboard
abstract class Environment(defaultExport: Boolean) : MutableDelegatable, ReadWriteProperty<Any?, String?>
Environment variable accessors, that by default exports if defaultExport is true.
exportEnv
Link copied to clipboard
object exportEnv : Environment
Environment accessors, where set variables are exported for other steps and tasks.
inputs
Link copied to clipboard
object inputs : Delegatable, ReadOnlyProperty<Any?, String>
Accessors for input variables.
logger
Link copied to clipboard
object logger
Methods to log to the GitHub action log.
outputs
Link copied to clipboard
object outputs : ReadWriteProperty<Any?, String>
A setter to set outputs.
PATH
Link copied to clipboard
object PATH
A setter for the path.
state
Link copied to clipboard
object state : MutableDelegatable, ReadWriteProperty<Any?, String>
Accessors for state.

Functions

fail
Link copied to clipboard
fun fail(message: String): Nothing
Fail with message, logging message as an error and killing the process.
fun fail(exception: Throwable): Nothing
Fail with exception, logging exception as an error and killing the process.
maskSecret
Link copied to clipboard
fun String.maskSecret()
Mask this in log output.
fun maskSecret(secret: String)
Mask secret in log output.
runAction
Link copied to clipboard
inline fun runAction(flush: Boolean = true, block: () -> Unit)
Runs block, failing the action if exceptions are thrown
runOrFail
Link copied to clipboard
inline fun <R> runOrFail(finally: () -> Unit = {}, flush: Boolean = true, block: () -> R): R
Runs block, fail-ing if an exception is thrown and not caught within block.
runOrLogException
Link copied to clipboard
inline fun <R> runOrLogException(finally: () -> Unit = {}, flush: Boolean = true, block: () -> R): Result<R>
Runs block, logging (as logger.error) any exceptions that are not caught within block.

Properties

isActionRunner
Link copied to clipboard
val isActionRunner: Boolean
true if the current environment is a GitHub actions runner.